Sending RCS Messages
The first message from an enterprise to a customer must be whitelisted at the RCS platform as a template. There are three template types: Text, Rich Card, and Rich Card Carousel.
3.2.2.1 Template Message
| S.No. | Attribute | Required | Data Type | Details |
|---|---|---|---|---|
| 3.1 | template_message | Yes | Object | Specifies the message as a template |
| 3.1.1 | channel_template | Yes | Object | Channel and template details |
| 3.1.1.1 | RCS | Yes | Object | Specifies the channel |
| 3.1.1.1.1 | template_id | Yes | String | Template identification |
| 3.1.1.1.2 | language_code | Yes | String | BCP-47 language code. Default: en |
| 3.1.1.1.3 | parameters | No | Object | Required if the template has variables |
| 3.1.1.1.3.1 | sinch_reserved_ttl | No | String | Message expiry duration in seconds (e.g. "3.5s"). Max: 15 days in seconds |
TTL Parameter: Set a message expiration to prevent offline users from receiving stale content. If not delivered within the TTL, the message is revoked by Google and a TTL_EXPIRATION_REVOKED failure event is sent.
{
"app_id": "01H0MFFJFX0YAWYA5XG4D3MRTA",
"recipient": { "identified_by": { "channel_identities": [{ "channel": "RCS", "identity": "919876543210" }] } },
"message": {
"template_message": {
"channel_template": {
"RCS": {
"template_id": "test_rcs_template",
"language_code": "en",
"parameters": { "cust_name": "Rajesh", "amount": "Rs. 5,000", "discount": "30%", "sinch_reserved_ttl": "14.5s" }
}
}
}
}
}
3.2.2.2 Text Message (without Buttons)
Useful when sending two consecutive messages — one informational and one with action buttons.
{
"app_id": "01H0MFFJFX0YAWYA5XG4D3MRTA",
"recipient": { "identified_by": { "channel_identities": [{ "channel": "RCS", "identity": "917023002081" }] } },
"message": { "text_message": { "text": "Friendly reminder of your appointment tomorrow at 10AM. Please confirm your booking by replying below." } }
}
3.2.2.3 Text Message with Buttons
Uses the choice_message object. Up to 10 buttons in any combination of Quick Reply, Open URL, Dial Number, and Send Location.
| Button Type | Object | Key Fields |
|---|---|---|
| Quick Reply | text_message | text, postback_data |
| Call | call_message | phone_number, title, postback_data |
| Location | location_message | coordinates.latitude, coordinates.longitude, title |
| URL | url_message | url, title, postback_data |
{
"app_id": "01H0MFFJFX0YAWYA5XG4D3MRTA",
"recipient": { "identified_by": { "channel_identities": [{ "channel": "RCS", "identity": "917023002081" }] } },
"message": {
"choice_message": {
"text_message": { "text": "Friendly reminder of your appointment tomorrow at 10AM." },
"choices": [
{ "text_message": { "text": "Confirm" }, "postback_data": "reply" },
{ "call_message": { "title": "Call Us", "phone_number": "+917023002081" }, "postback_data": "call" },
{ "url_message": { "title": "Know More", "url": "https://www.aclmobile.com/" }, "postback_data": "open a url" }
]
}
}
}
3.2.2.4 Rich Card Message
Send Image/Video with Title, Description, and up to 4 buttons.
| Attribute | Required | Details |
|---|---|---|
title | Yes | Card heading |
description | Yes | Card body text |
media_message.url | Yes | URL of image/video |
height | Yes | TALL, MEDIUM, or SHORT |
choices | No | Up to 4 buttons |
{
"app_id": "01H0MFFJFX0YAWYA5XG4D3MRTA",
"recipient": { "identified_by": { "channel_identities": [{ "channel": "RCS", "identity": "917023002081" }] } },
"message": {
"card_message": {
"title": "Sign up for our newsletter",
"description": "Our weekly newsletter with deals and extra content!",
"media_message": { "url": "https://sample-videos.com/img/Sample-jpg-image-100kb.jpg" },
"height": "MEDIUM",
"choices": [{ "text_message": { "text": "Sign up here" }, "postback_data": "Hello" }]
}
}
}
3.2.2.5 Rich Card Carousel Message
Up to 10 rich cards, each with its own image/video, title, description, and up to 4 buttons. Up to 10 additional buttons can be added at the end of the carousel.
{
"app_id": "01H0MFFJFX0YAWYA5XG4D3MRTA",
"recipient": { "identified_by": { "channel_identities": [{ "channel": "RCS", "identity": "917023002081" }] } },
"message": {
"carousel_message": {
"cards": [
{
"title": "Sign up for our weekly newsletter",
"description": "Our weekly newsletter is filled with deals!",
"media_message": { "url": "https://sample-videos.com/img/Sample-jpg-image-100kb.jpg" },
"height": "MEDIUM",
"choices": [{ "url_message": { "title": "Website", "url": "https://www.sinch.com" }, "postback_data": "postback data" }]
}
],
"choices": [
{ "url_message": { "title": "Click here", "url": "https://www.sinch.com" }, "postback_data": "postback data" },
{ "call_message": { "title": "Call Us", "phone_number": "+917023002081" }, "postback_data": "call" }
]
}
}
}